<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        function getScoreCount(array = []) {
            let sum = 0
            for (let index = 0; index < array.length; index++) {
                sum += array[index];
            }
            return sum;
        }

        console.log(getScoreCount([100, 100, 100]));
        console.log(getScoreCount());

    </script>
</body>

</html>